import serial
import serial.tools.list_ports



def all_port():
    port_list = list(serial.tools.list_ports.comports())
    for port in port_list:
        print(f"pid:{port.pid} ,device: {port.device}, name:{port.name},location: {port.location}, usb_info:{port.usb_info()}")
    pass


if __name__ == '__main__':
    all_port()